package com.construction_Safety.information.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.construction_Safety.information.mapper.CMaintainAlbumMapper;
import com.construction_Safety.information.domain.CMaintainAlbum;
import com.construction_Safety.information.service.ICMaintainAlbumService;

/**
 * 巡检相册管理Service业务层处理
 * 
 * @author yat
 * @date 2025-06-15
 */
@Service
public class CMaintainAlbumServiceImpl implements ICMaintainAlbumService 
{
    @Autowired
    private CMaintainAlbumMapper cMaintainAlbumMapper;

    /**
     * 查询巡检相册管理
     * 
     * @param id 巡检相册管理主键
     * @return 巡检相册管理
     */
    @Override
    public CMaintainAlbum selectCMaintainAlbumById(Integer id)
    {
        return cMaintainAlbumMapper.selectCMaintainAlbumById(id);
    }

    /**
     * 查询巡检相册管理列表
     * 
     * @param cMaintainAlbum 巡检相册管理
     * @return 巡检相册管理
     */
    @Override
    public List<CMaintainAlbum> selectCMaintainAlbumList(Long informationId)
    {
        return cMaintainAlbumMapper.selectCMaintainAlbumList(informationId);
    }

    /**
     * 新增巡检相册管理
     * 
     * @param cMaintainAlbum 巡检相册管理
     * @return 结果
     */
    @Override
    public int insertCMaintainAlbum(CMaintainAlbum cMaintainAlbum)
    {
        return cMaintainAlbumMapper.insertCMaintainAlbum(cMaintainAlbum);
    }

    /**
     * 修改巡检相册管理
     * 
     * @param cMaintainAlbum 巡检相册管理
     * @return 结果
     */
    @Override
    public int updateCMaintainAlbum(CMaintainAlbum cMaintainAlbum)
    {
        return cMaintainAlbumMapper.updateCMaintainAlbum(cMaintainAlbum);
    }

    /**
     * 批量删除巡检相册管理
     * 
     * @param ids 需要删除的巡检相册管理主键
     * @return 结果
     */
    @Override
    public int deleteCMaintainAlbumByIds(Integer[] ids)
    {
        return cMaintainAlbumMapper.deleteCMaintainAlbumByIds(ids);
    }

    /**
     * 删除巡检相册管理信息
     * 
     * @param id 巡检相册管理主键
     * @return 结果
     */
    @Override
    public int deleteCMaintainAlbumById(Integer id)
    {
        return cMaintainAlbumMapper.deleteCMaintainAlbumById(id);
    }

    @Override
    public int deleteCMaintainAlbumByInfoId(Long InformationId) {
        return cMaintainAlbumMapper.deleteCMaintainAlbumByInfoId(InformationId);
    }
}
